<?php

$json = '{';
if (isset($ajax['request']))
{
	$json = $json . '"r":"' . $ajax['request'] . '",';
}
if (isset($ajax['data']))
{
	$json = $json . '"d":' . json_encode($ajax['data']);
}
$json = $json . '}';

echo $json;

?>